﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ClassPractice2
{
    class Students
    {
        public string shortName;
        public string group;
        public int[] marks = new int[10];


        public void AddStudents()
        {
            Console.Write("Enter short name: ");
            shortName = Console.ReadLine();
            Console.Write("Enter group: ");
            group = Console.ReadLine();
        }
        
        public void AddStudentsMarks()
        {
            for (int i = 0; i < marks.Length; i++)
            {
                Console.Write("Enter mark: ");
                marks[i] = Int32.Parse(Console.ReadLine());
            }
        }

        public double AverageMark()
        {
            int sum = 0;
            for (int i = 0; i < marks.Length; i++)
            {
                sum += marks[i];
            }
            double averageMark = sum / marks.Length;
            return averageMark;
        }

        public void PrintStudents()
        {
            Console.WriteLine("Student: {0}", shortName);
            Console.WriteLine("Group: {0}", group);
            Console.WriteLine("Average mark: {0}", AverageMark());
        }
    }
}
